{extend name="personal/index" /}

{block name="center"}
      <div class="plc_main">
        <!--右侧开始-->
        <div class="main_cont">
          <div class="common_tab">
            <ul>
              <li class="current" id=myguanzhu>
                
                  我的关注
                
              </li>
              <li id="myfensi">
                
                  我的粉丝
               
              </li>
              <li id="myfriend">
                
                  我的好友
                
              </li>
              <li id="blackname">
                
                  黑名单
                
              </li>
            </ul>
          </div>
    <div id="laoda">
      <div class="mygz">
          <div class="follow_title">
            <h3>
              我关注了
              <span id="total">
                {$gzcount}
              </span>
              人
            </h3>
          </div>
        {volist name="guanzhuList" id="gzList"}
          <!--关注列表开始-->
          <div class="follow_list">
            <dl>
              <dt>
                <a href="indexPersonalOthersIndex?id={$gzList.id}" target="_blank">
                  {empty name="$gzList['icon']"}
                  <img src="static/image/personal/head6.jpg" width="50" hight="50" />
                  {else /}
                  <img src="uploads/{$gzList.icon}" width="50" hight="50" />
                  {/empty}
                  
                </a>
              </dt>
              <dd>
                <div class="name">
                  <a href="indexPersonalOthersIndex?id={$gzList.id}" target="_blank">
                    {$gzList.nickname}
                  </a>
                  {if condition="$gzList.sex eq '0'"} <i class="female"></i>
                  {else /} <i class="male"></i>
                  {/if}
                  <span class="area">
                  {$gzList.province}
                  </span>
                </div>
                <div class="concern">
                  <div class="info">
                    论坛签名:

                    <i class="wline">
                      |
                    </i>
                    {$gzList.sightml}
                  </div>
                  <div class="act">
                    <span class="follow_state">
                      <a class="a_btn delguanzhu" data_id={$gzList.id} style="cursor: pointer;">取消关注</a>
                      <a class="a_btn lahei" data_id={$gzList.id} style="cursor: pointer;">拉黑</a>
                    </span>
                  </div>
                </div>
              </dd>
            </dl>
          </div>
          <!--关注列表结束-->
        {/volist}
      </div>
    <!-- 关注我的 -->
      <div class="gzmy" style="display: none">
          <div class="follow_title">
            <h3>
              关注我的
              <span id="gzmy_total">
                {$gzmycount}
              </span>
              人
            </h3>
          </div>

        {volist name="gzmyList" id="gzmy"}
          <!--关注列表开始-->
          <div class="follow_list">
            <dl>
              <dt>
                <a href="indexPersonalOthersIndex?id={$gzmy.id}" target="_blank">
                  {empty name="$gzmy['icon']"}
                  <img src="static/image/personal/head6.jpg" width="50" hight="50" />
                  {else /}
                  <img src="uploads/{$gzmy.icon}" width="50" hight="50" />
                  {/empty}
                  
                </a>
              </dt>
              <dd>
                <div class="name">
                  <a href="indexPersonalOthersIndex?id={$gzmy.id}" target="_blank">
                    {$gzmy.nickname}
                  </a>
                  {if condition="$gzmy.sex eq '0'"} <i class="female"></i>
                  {else /} <i class="male"></i>
                  {/if}
                  <span class="area">
                  {$gzmy.province}
                  </span>
                </div>
                <div class="concern">
                  <div class="info">
                    论坛签名:

                    <i class="wline">
                      |
                    </i>
                    {$gzmy.sightml}
                  </div>
                  <div class="act">
                    <span class="follow_state">

                    {empty name="guanzhuList"}
                      <a class="a_btn addguanzhu" data_id="{$gzmy.id}" style="cursor: pointer;">关注</a>
                    {else /}
                      {volist name="guanzhuList" id="vo"}
                        {php}$arr[] = $vo['id'];{/php}
                      {/volist} 
                      {if condition="in_array($gzmy.id, $arr) eq true"}<a class="a_btn">已关注</a>
                      {else /}<a class="a_btn addguanzhu" data_id="{$gzmy.id}" style="cursor: pointer;">关注</a>
                      {/if}  
                    {/empty}
                    
                    {empty name="blackList"}
                      <a class="a_btn lahei2" data_id="{$gzmy.id}" style="cursor: pointer;">拉黑</a>
                    {else /}
                      {volist name="blackList" id="vo"}
                          {php}$arrh[] = $vo['id'];{/php}
                      {/volist}
                      {if condition="in_array($gzmy.id, $arrh) eq true"}<a class="a_btn">已拉黑</a>
                      {else /}<a class="a_btn lahei2" data_id="{$gzmy.id}" style="cursor: pointer;">拉黑</a>
                      {/if}
                    {/empty}

                              
                    </span>
                  </div>
                </div>
              </dd>
            </dl>
          </div>
          <!--关注列表结束-->
        {/volist}
      </div>


      <!-- 好友 -->
      <div class="friend" style="display: none">
          <div class="follow_title">
            <h3>
              互相关注
              <span id="friend_total">
                {$allcount}
              </span>
              人
            </h3>
          </div>

        {volist name="allgzList" id="allgz"}
          <!--关注列表开始-->
          <div class="follow_list">
            <dl>
              <dt>
                <a href="indexPersonalOthersIndex?id={$allgz.id}" target="_blank">
                  {empty name="$allgz['icon']"}
                  <img src="static/image/personal/head6.jpg" width="50" hight="50" />
                  {else /}
                  <img src="uploads/{$allgz.icon}" width="50" hight="50" />
                  {/empty}
                  
                </a>
              </dt>
              <dd>
                <div class="name">
                  <a href="indexPersonalOthersIndex?id={$allgz.id}" target="_blank">
                    {$allgz.nickname}
                  </a>
                  {if condition="$allgz.sex eq '0'"} <i class="female"></i>
                  {else /} <i class="male"></i>
                  {/if}
                  <span class="area">
                  {$allgz.province}
                  </span>
                </div>
                <div class="concern">
                  <div class="info">
                    论坛签名:

                    <i class="wline">
                      |
                    </i>
                    {$allgz.sightml}
                  </div>
                  <div class="act">
                    <span class="follow_state">
                    
                    </span>
                  </div>
                </div>
              </dd>
            </dl>
          </div>
          <!--关注列表结束-->
        {/volist}
      </div>


      <!-- 黑名单 -->
      <div class="black" style="display: none">
          <div class="follow_title">
            <h3>
              我的黑名单
              <span id="black_total">
                {$blackcount}
              </span>
              人
            </h3>
          </div>

        {volist name="blackList" id="black"}
          <!--关注列表开始-->
          <div class="follow_list">
            <dl>
              <dt>
                <a href="indexPersonalOthersIndex?id={$black.id}" target="_blank">
                  {empty name="$black['icon']"}
                  <img src="static/image/personal/head6.jpg" width="50" hight="50" />
                  {else /}
                  <img src="uploads/{$black.icon}" width="50" hight="50" />
                  {/empty}
                  
                </a>
              </dt>
              <dd>
                <div class="name">
                  <a href="indexPersonalOthersIndex?id={$black.id}" target="_blank">
                    {$black.nickname}
                  </a>
                  {if condition="$black.sex eq '0'"} <i class="female"></i>
                  {else /} <i class="male"></i>
                  {/if}
                  <span class="area">
                  {$black.province}
                  </span>
                </div>
                <div class="concern">
                  <div class="info">
                    论坛签名:

                    <i class="wline">
                      |
                    </i>
                    {$black.sightml}
                  </div>
                  <div class="act">
                    <span class="follow_state">
                      <a class="a_btn qxlahei" data_id="{$black.id}" style="cursor: pointer;">取消拉黑</a>
                    </span>
                  </div>
                </div>
              </dd>
            </dl>
          </div>
          <!--关注列表结束-->
        {/volist}
      </div>

    </div>
          <!--分页开始-->
          <div class="page_wrap">
            <div class="showpage">
            </div>
          </div>
          <!--分页结束-->
        </div>
        <!--右侧结束-->
      </div>



      <script>
          $('#myguanzhu').click(function(){
            $('#laoda > div:eq(0)').show().siblings('div').hide();
            $(this).addClass('current');
            $(this).siblings('li').removeClass('current');
          })

          $('#myfensi').click(function(){
            $('#laoda > div:eq(1)').show().siblings('div').hide();
            $(this).addClass('current');
            $(this).siblings('li').removeClass('current');
          })


          $('#myfriend').click(function(){
            $('#laoda > div:eq(2)').show().siblings('div').hide();
            $(this).addClass('current');
            $(this).siblings('li').removeClass('current');
          })


          $('#blackname').click(function(){
            $('#laoda > div:eq(3)').show().siblings('div').hide();
            $(this).addClass('current');
            $(this).siblings('li').removeClass('current');
          })

          //取消关注
          $('.delguanzhu').click(function(){
            var _this = $(this);
            var info = $(this).attr('data_id');
            $.ajax({
                type: 'get',
                url: "indexPersonalGuanzhuDelguanzhu",
                data: 'id='+info,
                dataType:'json',
                success: function(data){
                  if(data){
                    $(_this).parent().parent().parent().parent().parent().parent().remove();
                    $('#total').text( parseInt($('#total').text())-1 );

                  }
                }
              });
          })


          //关注
          $('.addguanzhu').click(function(){
            var _this = $(this);
            var info = $(this).attr('data_id');
            $.ajax({
                type: 'get',
                url: "indexPersonalGuanzhuAddguanzhu",
                data: 'id='+info,
                dataType:'json',
                success: function(data){
                  if(data){
                    $(_this).html('已关注');
                  }
                }
              });
          })


          //拉黑
          $('.lahei').click(function(){
            var _this = $(this);
            var info = $(this).attr('data_id');
            $.ajax({
                type: 'get',
                url: "indexPersonalGuanzhuLahei",
                data: 'id='+info,
                dataType:'json',
                success: function(data){
                  if(data){
                    $(_this).parent().parent().parent().parent().parent().parent().remove();
                    $('#total').text( parseInt($('#total').text())-1 );

                  }
                }
              });
          })


          //拉黑2
          $('.lahei2').click(function(){
            var _this = $(this);
            var info = $(this).attr('data_id');
            $.ajax({
                type: 'get',
                url: "indexPersonalGuanzhuLahei",
                data: 'id='+info,
                dataType:'json',
                success: function(data){
                  if(data){
                    $(_this).html('已拉黑');

                  }
                }
              });
          })





          //取消拉黑
          $('.qxlahei').click(function(){
            var _this = $(this);
            var info = $(this).attr('data_id');
            $.ajax({
                type: 'get',
                url: "indexPersonalGuanzhuQxlahei",
                data: 'id='+info,
                dataType:'json',
                success: function(data){
                  if(data){
                    $(_this).parent().parent().parent().parent().parent().parent().remove();
                    $('#black_total').text( parseInt($('#black_total').text())-1 );

                  }
                }
              });
          })




          







      </script>
     {/block}